package com.zrrd.ceshi;

public class MyRunnable implements Runnable{
    public MyRunnable(String name, String priority) {
    }

    @Override
    public void run() {
        for (int i = 0; i < 1100; i++) {
            System.out.println(i);
            try{
                Thread.sleep(300);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
class Main1{
    public static void main(String[] args) {
        MyRunnable runnable1 = new MyRunnable("线程1","1");
        MyRunnable runnable2 = new MyRunnable("线程2","10");
        MyRunnable runnable3 = new MyRunnable("线程3","5");
        runnable1.run();
        runnable2.run();
        runnable3.run();
    }
}